package entity;

import java.util.ArrayList;

import util.DateUtil;

/**
 * @author mohameds.2012, sheryl.tay.2012
 * 
 */
public class Course {
	private String courseCode;
	private String title;
	private String description;
	private String school;
	private ArrayList<Course> preRequisites;
	private String examDate;
	private String examStartTime;
	private String examEndTime;

	public Course(String courseCode, String title, String description,
			String school, String examDate, String examStartTime,
			String examEndTime, ArrayList<Course> preRequisites) {
		this(courseCode, title, description, school, examDate, examStartTime,
				examEndTime);
		this.preRequisites = preRequisites;
	}

	public Course(String courseCode, String title, String description,
			String school, String examDate, String examStartTime,
			String examEndTime) {
		this.courseCode = courseCode;
		this.title = title;
		this.description = description;
		this.school = school;
		this.examDate = examDate;
		this.examStartTime = examStartTime;
		this.examEndTime = examEndTime;
	}

	public String getCourseCode() {
		return courseCode;
	}

	public String getTitle() {
		return title;
	}

	public String getDescription() {
		return description;
	}

	public String getSchool() {
		return school;
	}

	public ArrayList<Course> getPreRequisites() {
		return preRequisites;
	}

	public String getExamDate() {
		return DateUtil.formatDate(examDate);
	}

	public String getExamStartTime() {
		return DateUtil.formatTime(examStartTime);
	}

	public String getExamEndTime() {
		return DateUtil.formatTime(examEndTime);
	}

	@Override
	public String toString() {
		return "\"course\": \"" + courseCode + "\", \"school\": \"" + school
				+ "\", \"title\": \"" + title + "\", \"description\": \""
				+ description + "\", \"exam date\": \"" + examDate
				+ "\", \"exam start\": \"" + examStartTime
				+ "\", \"exam end\": \"" + examEndTime + "\"";
	}

}
